<template>
  <v-chart :option="getOption()" :autoresize="true"></v-chart>
</template>

<script setup lang="ts">
const getOption = () => {
  return {
    xAxis: {
      show: false,
      min: 0,
      max: 100,
    },
    yAxis: {
      show: false,
      type: "category",
    },
    series: {
      type: "bar",
      color: "yellowgreen",
      data: [88],
      //柱状图的宽度
      barWidth: 10,
      //背景颜色
      showBackground: true,
      backgroundStyle: {
        color: "#eee",
      },
      //图文标签
      label: {
        show: true,
        position: "right",
        formatter: "|",
        color: "yellowgreen",
      },
    },
    grid: {
      left: 0,
      top: 0,
      right: 0,
      bottom: 0,
    },
  };
};
</script>

<style scoped>
</style>